<?php
header('content-type:text/html;charset=utf8');
$tel = $_POST['tel'];
$password = $_POST['password'];
$con = mysqli_connect("localhost","root","root","ikea");
$res = mysqli_query($con,"select * from user where tel='$tel' and password='$password'");
$row = mysqli_fetch_assoc($res);
if($row){
    $arr =[
        "meta"=>[
            "status"=>2,
            "msg"=>"登陆成功"
        ]
    ];
}else{
    $arr =[
        "meta"=>[
            "status"=>1,
            "msg"=>"手机号或密码错误"
        ]
    ];
}
echo json_encode($arr);